package com.jfinal.ext.sql;

import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;


public class QueryUtil {
	public static StringBuffer FIND_ALL = new StringBuffer("select * from ");
	protected static StringBuffer sqlStr=null;
	private static void console(String str){
		
	}
	/**
	 * 自动封装Sql
	 * 
	 * @param objects
	 * @return
	 */
	public static String make(Class clazz,ConcurrentHashMap<String, Object> paramMap) {
		if (paramMap != null) {
			sqlStr=new StringBuffer();
			Iterator<String> paramKey = paramMap.keySet().iterator();
			while (paramKey.hasNext()) {
				Object obj=paramMap.get(paramKey.next());
				sqlStr.append(" and ");
				
			}
		}else{
			console("请勿传入空集合");
		}
		return sqlStr.toString();
	}
	
	
}
